package com.zhxi.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhxi.common.utils.PageUtils;
import com.zhxi.common.utils.R;
import com.zhxi.gulimall.product.entity.CategoryEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @Author: zhxi
 * @Email: 664480310@qq.com
 * @Date: 2024-08-19 17:41:15
 * @Version: 1.0.0
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取所有分类（树形结构）
     */
    List<CategoryEntity> listWithTree();

    /**
     * 批量删除
     *
     * @param list ids数组
     * @return 删除结果
     */
    R removeMenu(List<Long> list);

    Long[] findCatelogIds(Long cateId);

    void updateCascade(CategoryEntity category);
}

